WARNING: This program has a bug, which means we need to fix it!

RULE: If an event doesn't have any code indented underneath, the program will throw an error.

  • Click Run and read the error message.
  • Debug the program so the ghost says something when you click on it.
  • Hint: Indent the ghost's say command!

To navigate the page using the TAB key, first press ESC to exit the code editor.

stage.set_background("hauntedhouse") sprite = codesters.Sprite("ghost", 0, -100) sprite.say("Click me to see a message!") def click(sprite): sprite.say('Boo!') sprite.event_click(click)
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)